import requests
from Utils.router import router


@router.get('/gy/step_wrbq/{step_num}')
async def step_change(step_num: str):
    step = step_num
    if step:
        url = 'https://service-cunaufvn-1302033217.bj.apigw.tencentcs.com/release/xm?user=18360500891&password=pp19970405&step=' + str(
            step)
        req = requests.get(url)
        return {'msg': req.text, 'code': 200, 'step': '修改的步数' + step}
    else:
        return {'msg': '程序错误！请填写步数'}


@router.get('/gy/step_ly/{step_num}')
async def step_change(step_num: str):
    step = step_num
    if step:
        url = 'https://service-cunaufvn-1302033217.bj.apigw.tencentcs.com/release/xm?user=15950703630&password=ly19971118&step=' + str(
            step)
        req = requests.get(url)
        return {'msg': req.text, 'code': 200, 'step': '修改的步数' + step}
    else:
        return {'msg': '程序错误！请填写步数'}
